--[[/**
-- * 
 * 恢复敌人最大生命的 N%
-- *
-- */]]

---@class BuffEffect486100 : BaseBuffEffect
BuffEffect486100 = ClientFight.CreateClass("BuffEffect486100", ClientFight.BaseBuffEffect)
local t = BuffEffect486100

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    if (target:isDie()) then
        return IBuffEffect.FAIL;
    end
    local attackTarget = parameters[1];
    local addHp = Utils.calcRatio(FighterAttributeManager.getFightAttr(attackTarget, FighterAttributeEnum.HP), buff.buffBean.f_BuffEffectValue[1]);
    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff"
            .. buff.modelId .. " 恢复敌方英雄最大生命值的" .. buff.buffBean.f_BuffEffectValue[2] .. " ,恢复量: " .. addHp);
    DamageManager.setFighterHp(fight, target, target, nil, DamageResultTypeEnum.HEAL, addHp, target.hp + addHp, false, false, true);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()